<?php
/* 
 * ebiz front
 * 
 * Cheque role Util
 * 
 * @author allen
 * 
 */
require_once '../app/constants/Order.php';

class ChequeRuleUtil 
{   
	/*
	 * return Cheque Rule and Tax Point
	 */
	public static function getTaxInfoByChequeRule($chequeRule){
		if($chequeRule == "1" || $chequeRule == "11" || $chequeRule == "12" || $chequeRule == "13" || $chequeRule == "14" || $chequeRule == "15"){
			$rule = "optional";
		}
		if($chequeRule == "2" || $chequeRule == "21" || $chequeRule == "22" || $chequeRule == "23" || $chequeRule == "24" || $chequeRule == "25"){
			$rule = "compel";
		}
		if($chequeRule == "3"){
			$rule = "without";
		}
		$taxPoint = Order::getDefaultChequeRule($chequeRule);
		$result = array("rule" => $rule, "taxPoint" => $taxPoint);
		return $result;
	}
	
}


